

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>fix continuum/weighted command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>fix continuum/weighted command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/fix_continuum_weighted.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="fix-continuum-weighted-command">
<span id="index-0"></span><h1>fix continuum/weighted command<a class="headerlink" href="#fix-continuum-weighted-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p>fix ID group-ID continuum/weighted keyword value</p>
<ul class="simple">
<li>ID, group-ID are documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command</li>
<li>continuum/weighted = style name of this fix command</li>
<li>zero or one keyword/value pairs may be appended</li>
</ul>
<pre class="literal-block">
keyword = {kernel_radius, kernel_type, compute}
  <em>kernel_radius</em> value = radius
    radius = Radius of the smoothing kernel
  <em>kernel_type</em> value = type
    type = Type of kernel {Top_Hat, Gaussian, Wendland}
  <em>compute</em> value = compute-type
    compute-type = Which tensor(s) to compute {stress, strain, stress_strain}
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix 1 all continuum/weighted kernel_radius 0.01 compute stress
fix 1 all continuum/weighted kernel_radius 0.2 kernel_type Wendland compute stress_strain
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>If the <em>compute</em> keyword is set to either stress or stress_strain this fix calculates the complete stress tensor at
each particle according to <a class="reference internal" href="#goldhirsch"><span>Goldhirsch</span></a>. The formula is given by:</p>
<div class="highlight-python"><div class="highlight"><pre>sigma_{i,ab} = -1/2 sum_{j,k} f_{jk,a} r_{jk,b} integral_0^1 phi(**r**_i - **r**_j + s **r**_{jk}) ds
             - sum_j m_j v&#39;_{ij,a} v&#39;_{ij,b} phi(r_i - r_j)
             + sigma_wall_{i,ab}
</pre></div>
</div>
<p>where</p>
<pre class="literal-block">
<strong>v</strong>'_{ij} = <strong>v**_j - **V**_i
**V**_i = **p**_i / rho_i
**p**_i = sum_j m_j **v**_j phi(r_i - r_j)
rho_i = sum_j m_j phi(r_i - r_j)
phi(**r</strong>) = H(radius - <a href="#id39"><span class="problematic" id="id40">|r|</span></a>) / Omega(radius)
Omega(radius) = 4/3 pi radius^3
</pre>
<p>and</p>
<pre class="literal-block">
<strong>v</strong> is the velocity vector
<a href="#id7"><span class="problematic" id="id8">**</span></a>f**_{ij} force acting from j onto i
<a href="#id9"><span class="problematic" id="id10">**</span></a>r**_{ij} vector from center of j to center of i
m_i mass of particle i
H is the Heavyside function
</pre>
<p>In case solid boundaries are present the last term is given according to <a class="reference internal" href="#weinhart"><span>Weinhart et al.</span></a> by</p>
<div class="highlight-python"><div class="highlight"><pre>sigma_wall_{i,ab} = - sum_{j,k} f_{jk,a} a_{jk,b} integral_0^1 phi(**r**_i - **r**_j + s **a**_{jk}) ds
</pre></div>
</div>
<p>where</p>
<div class="highlight-python"><div class="highlight"><pre>**a**_{jk} = **r**_j - c_{jk}
</pre></div>
</div>
<p>and <a href="#id21"><span class="problematic" id="id22">**</span></a>c**_{jk} is the contact point of particle <em>j</em> with wall <em>k</em> and the sum runs over all particles <em>j</em> and walls <em>k</em>.</p>
<p>If the <em>compute</em> keyword is set to either strain or stress_strain this fix calculates the incremental strain tensor at
each particle according to <a class="reference internal" href="fix_rigid.html#zhang"><span>Zhang et al.</span></a> The formula is given by</p>
<div class="highlight-python"><div class="highlight"><pre>epsilon_*i,ab* = 1/(2 rho_i) sum_*j,k* m_j m_k phi(**r**_{ij}) dt (**v**_{jk,a} grad_phi(**r**_{ik},b) + **v**_{jk,b} grad_phi(**r**_{ik},a))
</pre></div>
</div>
<p>where most of the variables are given as above and additionally</p>
<div class="highlight-python"><div class="highlight"><pre>**v**_{ij,a} is the a-th component of the velocity difference between i and j
grad_phi(**r**_{ij},a) is the a-th component of the gradient of phi with respect to **r**_i
dt is the time-step size
</pre></div>
</div>
<p>The following three kernel types are implemented at the moment:</p>
<ul class="simple">
<li><em>Top_Hat</em> - Top hat kernel</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>w(r) = a_t * 1 if q &lt; 1 (q = r / kernel_radius)
     = 0 otherwise
</pre></div>
</div>
<ul class="simple">
<li><em>Gaussian</em> - Gaussian kernel</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>w(r) = a_g * exp(-q^2) (q = 3 r / kernel_radius)
</pre></div>
</div>
<ul class="simple">
<li><em>Wendland</em> - Quinitic radial polynomial</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>w(r) = a_w * (1-q/2)^4 (1+2q) (q = 2 r / kernel_radius)
</pre></div>
</div>
<p>Note that all kernels are equal to zero if <em>r &gt; kernel_radius</em> (this implies a cut-off for the Gaussian). The constants <em>a</em> (different for each kernel) are chosen such that the integral of <em>w</em> over the ball of radius <em>kernel_radius</em> is equal to one. In case of the top hat kernel <em>a_t</em> is equal to the volume of this sphere.</p>
</div>
<hr class="docutils" />
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>.  None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options
are relevant to this fix.</p>
<p>The values can be dumped by using the <em>f_stressTensor_[i]</em> and/or <em>f_strainTensor_[i]</em> (0 &lt;= i &lt;= 8) values in <a class="reference internal" href="dump.html"><em>dump</em></a> commands</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command.  This fix is not invoked during <code class="xref doc docutils literal"><span class="pre">energy</span> <span class="pre">minimization</span></code>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>Strain computation does not work with the default <em>TOP_HAT</em> kernel as its derivative is zero.</p>
<p>In order to ensure that all particles in the kernel radius are considered make use of the <a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a>
command. In particular the <em>contact_distance_factor</em> which should be set such that</p>
<div class="highlight-python"><div class="highlight"><pre><span class="mi">2</span><span class="o">*</span><span class="nb">min</span><span class="p">(</span><span class="n">radius</span><span class="p">)</span><span class="o">*</span><span class="n">contact_distance_factor</span> <span class="o">&gt;=</span> <span class="n">kernel_radius</span>
</pre></div>
</div>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="compute.html"><em>compute</em></a>, <a class="reference internal" href="compute_stress_atom.html"><em>compute stress/atom</em></a>,
<a class="reference internal" href="fix_ave_atom.html"><em>fix ave/atom</em></a>, <a class="reference internal" href="fix_ave_histo.html"><em>fix ave/histo</em></a>,
<a class="reference internal" href="fix_ave_time.html"><em>fix ave/time</em></a>, <a class="reference internal" href="fix_ave_spatial.html"><em>fix ave/spatial</em></a>,
<a class="reference internal" href="fix_ave_euler.html"><em>fix ave/euler</em></a></p>
<p><strong>Default:</strong> none</p>
<p><strong>References:</strong></p>
<p id="goldhirsch"><strong>(Goldhirsch)</strong> Goldhirsch; Stress, stress asymmetry and couple stress: from discrete particles to continuous fields, Granular Matter (2010)</p>
<p id="weinhart"><strong>(Weinhart)</strong> Weinhart, Thornton, Luding, Bokhove; From discrete particles to continuum fields near a boundary (2012)</p>
<p id="zhang"><strong>(Zhang)</strong> Zhang, Behringer, Goldhirsch; Coarse-Graining of a Physical Granular System, Progress of Theoretical Physics Supplement (2010)</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>